package com.xzy.service;


import com.xzy.domain.User;
import com.xzy.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public User login(User user) {
        User getUser = userMapper.getUser(user);
        if(getUser!=null){
            user.setId(1);
            return user;
        }else {
            return null;
        }
    }
}